package com.mysteel.search.feign;

import com.mysteel.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * ProjectName: mail
 * ClassName: ProductFeignService
 * Description:
 * date: 2021/02/03/003 16:21
 *
 * @author xiaochao
 */
@FeignClient("product")
public interface ProductFeignService {
    /**
     * 通过属性ID获取属性详细信息
     * @param attrId
     * @return
     */
    @GetMapping("/product/attr/info/{attrId}")
    R getAttrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 根据品牌ID批量查询品牌信息
     * @param brandIds
     * @return
     */
    @RequestMapping("/product/brand/infos")
    R getBrandInfos(@RequestParam("brandIds") List<Long> brandIds);
}
